1. Field of the Invention
The present invention relates to a motor current controller and a method for controlling motor current which are suitable to be implemented for controlling a stepping motor.
2. Description of the Related Art
When an inductive load such as a motor coil is current-driven by an H-bridge circuit, pulse width modulation (PWM) control is often used. The PWM control is to control a current in a load by repeating charge and discharge of the current.
An example of motor drive using the PWM control is described, for example, in JP-A-2002-204150. In the abstract of JP-A-2002-204150, it is described that the problem to be solved by the disclosure is: “to suppress pulsation of load current by performing accurate current control when constant current control is performed by repeating charge/discharge of a current for a reactance load through an H-bridge circuit mounted on an IC.” It is also described that the solution for the problem is: “The semiconductor integrated circuit comprises an H-bridge circuit for driving a coil load L being connected with a pair of external output terminals 15 and 16, a PWM control circuit 20 for driving the switching of output switch elements 11-14 in the H-bridge circuit with a PWM signal and setting a charge mode, a slow decay mode or a fast decay mode of the H-bridge circuit selectively for the load, a first current detection circuit 21 for detecting a load current dropping below a first set level in fast decay mode for the load, and an output control logic circuit 23 for controlling a PWM control circuit by receiving a detection output from the first current detection circuit 21 and generating a control signal for making a switch to the slow decay mode.”
As one of the above-mentioned motor driving method, a micro-step drive method is known which has small residual vibration and excellent stability when a rotor rotates particularly at a low speed. In this method, field effect transistors (FETs) which are switching elements of the H-bridge circuit are subjected to the PWM control to match a motor current with a reference current curve (hereinafter, referred to as a “reference current”) having a substantially sinusoidal wave shape which is induced from the positional relationship between a rotor and a stator, thereby realizing constant current control. A basic step angle (for example, one turn) is divided into 1/n and the reference current is changed every the divided angle periods. These angle periods are referred to as micro-steps and each have one or more PWM cycles. That is, a microcomputer or the like can easily generate a stepwise current which varies in a stepwise manner.
However, during a state where the motor current is falling, a current waveform in the charge mode varies depending on a drive voltage, a rotation speed, a load torque condition, or the like of a motor. Since inductance of the coil varies depending on the positional relationship between the rotor and the stator and it is thus difficult to control the motor current waveform using the current detection circuit, a decay speed of the motor current during discharge may cause current ripples (current fluctuation) of the motor current. The current ripples cause torque loss, vibration, or noise of the motor. Frequent switching of a coil voltage and current-supply direction between the charge mode and the fast decay mode may cause electromagnetic noise.
In the technique described in JP-A-2002-204150, two comparators are provided to compare a measured current value with two reference values and the operation mode is switched based on the comparison result and/or the time. As another technique, it can also be considered that the ripples are suppressed by increasing the number of steps divided in the micro-step drive to shorten the PWM cycle. However, as described in JP-A-2002-204150, addition of two comparators causes an increase in cost. Since the shortening of the PWM cycle excessively increases the load of the microcomputer, it is necessary to use a dedicated motor driver or a high-cost microcomputer, thereby causing an increase in cost.